Skip to content

fix(serve): strip <think> blocks and restore voice dropdown (#138)#139

Merged
crrow merged 1 commit intomainfrom
issue-138-think-strip
Apr 9, 2026
Merged

fix(serve): strip <think> blocks and restore voice dropdown (#138)#139
crrow merged 1 commit intomainfrom
issue-138-think-strip

Conversation

@crrow
Copy link
Copy Markdown
Contributor

@crrow crrow commented Apr 9, 2026

Closes #138

Reasoning models (Qwen, DeepSeek) wrap chain-of-thought in
<think>...</think> tags. These were being passed directly to TTS
and spoken aloud.

Add incremental strip_think_incremental() in voice.rs that tracks
open/close tags across streaming token boundaries. Only visible
text (outside thinking blocks) reaches the sentence buffer and TTS.

Also restore the voice selector as a dropdown populated from
/v1/voices instead of a plain text input.

Closes #138

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@crrow crrow added the bug Something isn't working label Apr 9, 2026
@crrow crrow merged commit 4e26f90 into main Apr 9, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(serve): strip <think> blocks and restore voice dropdown in demo

1 participant